﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace DServiceDiscovery
{
	class DServiceDiscoveryConsoleProgram
	{
		static void Main(string[] args)
		{
			var service = new DServiceDiscovery() { MaxPort = 10000 };

			var serviceThread = new Thread(
				new ThreadStart(() => service.Run()));
			serviceThread.Start();

			while (Console.ReadLine() == "")
			{
				Console.WriteLine(service.GetServices());
			}
			service.Dispose();
		}
	}
}
